---
import { undefined } from "astro:schema"

// 网址，平台（必选），用户名（必选）
const { website, platform, username } = Astro.props
let url = ''
if (website!==undefined && website!==null && website!=='') url = website
else url = `https://www.${platform}.com/${username}`
---
<a href={url}>{platform}</a>

<style>
  a {
    padding: 0.5rem 1rem;
    color: white;
    background-color: #4c1d95;
    text-decoration: none;
  }
</style>